1
general::
Phrase(s): work out for the best
[for a bad situation] to turn out all right in the end. • Don’t worry. Everything will work out for the best. • I think that nothing ever works out for the best.
McGrawhill's American Idioms And Phrasal Verbs